package lab10.com.acme;

public class SavingAccount extends AbstractAccount
{
	private static final String NOT_ENOUGH_SAVING = "There is not enough money on your saving account";

	public SavingAccount(final double amount)
	{
		super(amount);
	}

	@Override
	public void deposit(final double amount)
	{
		this.balance += amount; 
	}
	
	@Override
	public void withdraw(final double amount)
	{
		if (amount < this.balance)
		{
			this.balance -= amount;
		}
		else
		{
			System.out.println(NOT_ENOUGH_SAVING);
		}
	}
}
